<?php
require_once 'constantes.php';

//echo DNSPOSTGRESQL;


class DaoConn{
	
	protected $bdd;
	/*ouverture de la connexion*/
	protected  function open() {
		try {
			$pdo_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
			$this->bdd = new PDO(DNSPOSTGRESQL, USER, PASS, $pdo_options);
		} catch (Exception $e) {
			die('ERREUR : '.$e->getMessage());
		}
	}
	
	/*fermeture de la connexion*/
	protected  function close() {
		$this->bdd = null;
	}
}